import request from 'src/utils/request'

const base_2 = import.meta.env.DEV ? 'http://localhost:3019/shenwenyi' : ''

// 巡检计划列表数据
export function planList(data) {
    return request({
        // url: base_2 +'/serve/patrolPlan/list',
        url:'/serve/patrolPlan/list',
        method: 'post',
        data
    })
    return Promise.resolve({
        data: {
            records: [
                {
                    productNo: 11,
                    merchantName:'项目名称',
                    categoryName:'所属公司',
                    type:'创建时间'
                }
            ],
            total: 10
        }
    })
}

// 获取项目管理列表数据
export function projectList(data) {
    return request({
        url:'/resource/village/query',
        method: 'post',
        data
    })
}

// // 巡检计划列表根据id查详情回显
// export function getDetailById(data) {
//     return request({
//         url: '/resource/village/queryDetail/' + data,
//         method: 'get',
//         params:{}
//     })
// }

// 新增巡检计划确定时调的api
export function addRow(data) {
    return request({
        // url: base_2 +'/serve/patrolPlan/add',
        url: '/serve/patrolPlan/add',
        method: 'post',
        data
    })
}

// 编辑巡检计划确定时调的接口
export function editRow(data) {
    return request({
        // url: base_2 +'/serve/patrolPlan/update',
        url:'/serve/patrolPlan/update',
        method: 'post',
        data
    })
}
// 巡检计划删除按钮接口
export function deletePlanList(data) {
    return request({
        // url: base_2 +'/serve/patrolPlan/del',
        url:'/serve/patrolPlan/del',
        method: 'post',
        data
    })
}

// 巡检计划根据id查详情
export function getId(data) {
    return request({
        // url: base_2 +'/serve/patrolPlan/details',
        url: '/serve/patrolPlan/details',
        method: 'post',
        data
    })
}

